home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / Menu / DLL / MakeDLL < prev    next >
Text File  |  1995-07-08  |  4KB  |  150 lines

  1.  
  2. ObjectFiles    =        \
  3.             o.AddSubMenu    \
  4.             o.Extend    \
  5.             o.FontMenu    \
  6.             o.FullDispos    \
  7.             o.GetFlags    \
  8.             o.GetText    \
  9.             o.MakeIndrct    \
  10.             o.MakeWrite    \
  11.             o.NewMenu    \
  12.             o.PopUp    \
  13.             o.PopUpAuto    \
  14.             o.RemItem    \
  15.             o.ReviseWdth    \
  16.             o.SetFlags    \
  17.             o.SetText    \
  18.             o.Show    \
  19.             o.Warn    \
  20.             o.FontMenu3    \
  21.  
  22.  
  23. LibName        =    Menu
  24.  
  25.  
  26.  
  27. # Template makefile to make Straylight Dynamic Link 
  28. # Library from a DeskLib sublibrary's .o files
  29. #
  30. # The DLL is made in the directory 
  31. # '<DeskLib$Dir>.!DLLs.Freeware_1.DeskLib.'
  32. # and has the same name as the DeskLib sublibrary.
  33. #
  34. # Julian Smith 17 Apr 1995.
  35.  
  36. # The macro $(ObjectFiles) should be set at the 
  37. # start of this file, to be a space-separated
  38. # list of object files.
  39. # This is done by 'Makatic'.
  40.  
  41. # The macro $(LibName) should also be set at the 
  42. # start of this file, to be the name of the 
  43. # DeskLib sublibrary.
  44. # This is done by 'Makatic'.
  45.  
  46. # Note that this makefile doesn't use cc at all
  47. # - it merely links existing .o files.
  48.  
  49. # Linker flags, These can be anything. 
  50. # All flags required by Straylight (eg Link -rmf) 
  51. # are included in the $(LINK) macro.
  52. #
  53. LinkFlags    =    $(LinkExtra)
  54.  
  55.  
  56. # Macros for commands, including the Straylight
  57. # tool 'cdll'. Note that DRLink doesn't seem to
  58. # work with the SDLS.
  59. #
  60. LINK        =    Link -rmf
  61. CDLL        =    cdll
  62.  
  63.  
  64. # Filename of the thing we need to make: - the main
  65. # dynamically-linked library, which will go in the 
  66. # !DLL application.
  67. # NB The leafname of $(DLL_Lib) file (after copying into the !DLL
  68. # application) should be the same as the 'name' field in the
  69. # $(DLL_Def) file. In this case, this is $(LibName).
  70. DLL_Lib        =    <DeskLib$Dir>.!DLLs.Freeware_1.DeskLib.$(LibName)
  71.  
  72.  
  73. # Filenames of intermediate files needed to make $(DLL_Lib) and $(DLL_Stubs).
  74. #
  75. DLL_Header    =    Header
  76. DLL_Def        =    ^.DLLDef
  77. DLL_Stubs    =    Stubs
  78.  
  79.  
  80.  
  81. # -------------------------------------------------------
  82. # Everything below here should probably not be changed...
  83. # -------------------------------------------------------
  84.  
  85.  
  86. # Extra libs, written by Straylight, which always need to be linked into a DLL
  87. #
  88. SDLS_ExtraObjects=                    \
  89.             C:DLLLib.o.DLLLib        \
  90.             C:DLLLib.o.dstubs        \
  91.  
  92.  
  93. # Extra DeskLib libraries which need to be linked into the final DLL.
  94. # The DLL DeskLib library is included here because some DeskLib DLLs may
  95. # refer to other DeskLib DLLs.
  96. # Note that DeskLib:o.DLL contains all the DLL.o.* files except for 
  97. # the sublibraries for which there is a DLL - just the DLL Stubs file
  98. # is included for these.
  99. #
  100. DeskLib_ExtraObjects=                \
  101.             DeskLib:o.DLLDLL    \
  102.  
  103.  
  104.  
  105.  
  106. #Here's what we want to make...
  107.  
  108. All:    $(DLL_Lib)
  109.  
  110. $(DLL_Lib):    $(DeskLib_ExtraObjects) $(SDLS_ExtraObjects) $(DLL_Header) $(ObjectFiles)
  111.     $(LINK) $(LinkFlags) -o $@ $(ObjectFiles) $(DeskLib_ExtraObjects) $(SDLS_ExtraObjects) $(DLL_Header)
  112.  
  113.  
  114.  
  115. # Here's how to make the things which are needed in the above rules
  116.  
  117. $(DLL_Def):    
  118.     | Error: No DLL definition file exists.
  119.     |        You should run th MkStubsOs makefile
  120.     |        and then alter the template Def
  121.     |        file by hand.
  122.  
  123. $(DLL_Header):    $(DLL_Def)
  124.     $(CDLL) -def $(DLL_Def) -hdr $(DLL_Header)
  125.  
  126.  
  127. # Rule for compiling C source code for a Straylight dynamically-linked library.
  128. # Actually, we don't call cc - we complain and tell the user to run the 
  129. # MkStubsOs makefile.
  130.  
  131. VPATH = @.^
  132.  
  133. .SUFFIXES:    .o .c .s
  134. .c.o:
  135.     | $@ needs recompiling. This should be done by
  136.     | running the MkStubsOs or MkOs makefile before running
  137.     | this makefile.
  138.     |
  139.  
  140. .s.o:
  141.     | $@ needs assembling. This should be done by
  142.     | running the MkStubsOs or MkOs makefile before running
  143.     | this makefile.
  144.     |
  145.  
  146.  
  147.  
  148. # Dynamic dependencies:
  149.